//
//  Common.h
//  Custom_Weibo
//
//  Created by LEO on 12/7/15.
//  Copyright © 2015 Leo_Lei. All rights reserved.
//

#ifndef Common_h
#define Common_h

//********************************DEVICE_SETTING********************************
#define DEVICE_AVALIABLE_IOS7   ([[UIDevice currentDevice].systemVersion floatValue] >= 7.0)
#define DEVICE_AVALIABLE_IOS8   ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0)

//*********************************BASIC_SETTING********************************
//-------------------------Application_Base_Information-------------------------
#define kAppKey                 @"1668055096"
#define kAppSecret              @"014b63f342686b4a4b3efc2ac03c6531"
#define kAppRedirectURL         @"http://www.weibo.com"
#define kBaseUrl                @"https://api.weibo.com/2/"

//----------------------------------Screen_Size---------------------------------
#define kScreenHeight           [UIScreen mainScreen].bounds.size.height
#define kScreenWidth            [UIScreen mainScreen].bounds.size.width

#define kNavigationBarHeight    64
#define kNavigationItemSize     44
#define kBottomBarHeight        49

/*  Those values wil influence the weibo view frame.It depends on the user 
 name's position.But when we change multiple at the same time, it will only 
 decrease the frame by right side.
 */
#define kWeiboSideBlank         10
#define kWeiboSideMultiple      2
#define kWeiboSideButtonTag     6666
#define kEditBarbuttonTag       7777

//----------------------------Bottom_Bar_Button_Size----------------------------
/*  Button count influence the button shows on the tab bar.If the count set more
 than 5, the fifth and more buttons will be stored in a 'more' button.
 */
#define kBottomButtonCount      5
#define kBottomButtonHeight     kBottomBarHeight
#define kBottomButtonWidth      kScreenWidth / kBottomButtonCount

//-----------------------------------HUD_SIZE-----------------------------------
/*  Those value only influence the loading tip view's size.
 */
#define kHUDWidth               60
#define kHUDHeight              80

//----------------------------------BADGE_SIZE----------------------------------
//  Supposed the badge frame should be a square.
#define kBadgeViewSidelength    30

//-------------------------------Access_Information-----------------------------
#define kAuthDataName           @"MyWeiboAuthData"
#define kAccessToken            @"AccessToken"
#define kExpirationDate         @"ExpirationData"
#define kUserID                 @"UserIDKey"

#define kUnread_Count           @"remind/unread_count.json"
#define kHome_Timeline          @"statuses/home_timeline.json"
#define kComments               @"comments/show.json"
#define kSend_Update            @"statuses/update.json"
#define kSend_Upload            @"statuses/upload.json"
#define kGeo_To_Address         @"location/geo/geo_to_address.json"
#define kNearby_Pois            @"place/nearby/pois.json"
#define kNearby_Timeline        @"place/nearby_timeline.json"

#define kNewDataTag             8888
#define kOldDataTag             9999
//*********************************HOME_SETTING*********************************
#define kWeiboViewFrame
#define kWeiboTextFrame
#define kWeiboImageFrame
#define kRepostTextFrame
#define kRepostImageFrame

#define kFontSize_Weibo(isDetail)   isDetail?17:15
#define kFontSize_ReWeibo(isDetail) isDetail?15:13

#define kFontSize_Bold          18

#define kThumbImageWidth        80
#define kThumbImageHeight       80

#define kLeftDrawerWidth        150
#define kRightDrawerWidth       60

//*********************************EMOJI_SETTING********************************
#define kRowsOfEmoji            4
#define kQueuesOfEmoji          7

#define kEmojiWidth             30
#define kEmojiHeight            30
#define kEmojiViewWidth         (kScreenWidth/kQueuesOfEmoji)
#define kEmojiViewHeight        45
#define kEmojiZoomScale         1.5

#define kEmojiTag               111111
//*********************************THEME_SETTING********************************
//--------------------------------Basic_Property--------------------------------
#define kThemeFileName          @"theme.plist"
#define kConfigFileName         @"config.plist"
#define kEmojiFileName          @"emoticons.plist"
#define kSoundFileNaem          @"msgcome.wav"

#define kSavedThemeName         @"themeName"
#define kDefaultThemeName       @"Ocean Run"

#define kRGB(R, G, B, A)        [UIColor colorWithRed:R / 255.0 green:G / 255.0 blue:B / 255.0 alpha:A]

//----------------------------All_Identifier_for_Cell---------------------------
#define kCellID                 @"cellID"
#define kThemeCellID            @"themeCellID"
#define kCommentCellID          @"commentCellID"
#define kLocationCellID         @"locationCellID"
#define kLeftViewCellID         @"leftVieCellID"
#define kRightViewCellID        @"rightViewCellID"
#define kAnnotationCellID       @"annotationCellID"

//*********************************NOTIFICATION*********************************
#define kThemeNotification      @"ThemeDidChange"

#endif /* Common_h */
